
package com.cptravel.api;

import java.util.Map;

import android.text.TextUtils;
import android.widget.ProgressBar;

import com.core.api.ApiListenrDefaultImpl;
import com.core.api.B5MBaseRequest;

public class PostorderRequest extends B5MBaseRequest<PostorderResponse>
{
    public String pid;
    public String price;
    public String contact;
    public String phone;
    public String email;
    public String note;
    public String classid;
    //景区
    public String ticketstype;
    public String number;
    public String usetime;
    //酒店
    public String roomtype;
    public String intime;
    public String outtime;
    public String inperson;

    public PostorderRequest(ApiListenrDefaultImpl apiListenrDefaultImpl, ProgressBar progressBar)
    {
        super(apiListenrDefaultImpl, progressBar);
        // TODO Auto-generated constructor stub
    }

    @Override
    public Class<PostorderResponse> getResponseClass()
    {
        // TODO Auto-generated method stub
        return PostorderResponse.class;
    }

    @Override
    public String getApiMethod()
    {
        // TODO Auto-generated method stub
        return "postorder";
    }

    @Override
    public void setApiBody(Map<String, Object> body)
    {
        // TODO Auto-generated method stub
        body.put("pid", pid);
        body.put("price", price);
        body.put("contact", contact);
        body.put("phone", phone);
        body.put("email", email);
        body.put("note", note);
        body.put("classid", classid);
        if (!TextUtils.isEmpty(ticketstype))
        {
            body.put("ticketstype", ticketstype);
        }
        if (!TextUtils.isEmpty(number))
        {
            body.put("number", number);
        }
        if (!TextUtils.isEmpty(usetime))
        {
            body.put("usetime", usetime);
        }
        if (!TextUtils.isEmpty(roomtype))
        {
            body.put("roomtype", roomtype);
        }
        if (!TextUtils.isEmpty(intime))
        {
            body.put("intime", intime);
        }
        if (!TextUtils.isEmpty(outtime))
        {
            body.put("outtime", outtime);
        }
        if (!TextUtils.isEmpty(inperson))
        {
            body.put("inperson", inperson);
        }
    }
}
